﻿<?php
session_start();
include "classes/utils/lang.php";
include "classes/utils/multilang.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Kálmán mezei</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
	<?php $site = isset($_GET['site'])?$_GET['site']:'';?>
	<?php include "classes/utils/utils.php";?>
    <!-- Le styles -->
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/lightbox.css" rel="stylesheet" />
    <link href="css/main.css" rel="stylesheet" />
    <style type="text/css">
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
      .sidebar-nav {
        padding: 9px 0;
      }
    </style>
    <link href="css/bootstrap-responsive.css" rel="stylesheet">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Fav and touch icons -->
    
  </head>

  <body>

    <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container-fluid">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a class="brand" href="index.php?site=home">Soccer T-shirts</a>
          <div class="nav-collapse collapse">
            <p class="navbar-text pull-right">
            <?php 
            
				if(Utils::isLoggedIn()){
    				echo "<a href=\"logout.php\" class=\"navbar-link\">".LOGOUT_TXT."</a>";
    				
				} else {
					echo "<a href=\"login.php\" class=\"navbar-link\">".LOGIN_TXT."</a>";
				}
?>
            </p>
            <ul class="nav">
              <li <?php $site== "home" ? print("class=\"active\""): print("")?>><a href="index.php?site=home"><?php echo (MAINPAGE_TXT)?></a></li>
              <li <?php $site== "teams" ? print("class=\"active\""): print("")?>><a href="index.php?site=teams"><?php echo (TEAMS_TXT)?></a></li>
			  <li <?php $site== "contact" ? print("class=\"active\""): print("")?>><a href="index.php?site=contact"><?php echo (CONTACT_TXT)?></a></li>
			  <!--  li <?php $site== "links" ? print("class=\"active\""): print("")?>><a href="index.php?site=links"><?php echo (LINKS_TXT)?></a></li-->
			  
			  <?php 
			  if(Utils::isLoggedIn()){
			  	echo "<li ".($site== "admin" ? "class=\"active\"": "")."><a href=\"index.php?site=admin\">Adminisztráció</a></li>";
			  
			  }
			  ?>
			  <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo (LANGUAGE_TXT)?> <b class="caret"></b></a>
                <ul class="dropdown-menu">
                  <li><a href="changelanguage.php?lang=hu">Magyar</a></li>
                  <li><a href="changelanguage.php?lang=en">English</a></li>
                </ul>
              </li>
            </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>

    <div class="container-fluid">
     <?php
	 if ($site == null) {
		$site = "home"; 
	 }
	 if (($site != "home") && ($site != "teams") && ($site != "aboutme") && ($site != "possibilites") && ($site != "contact") && ($site != "links") && ($site != "admin")) {
		$site = "home";
	 }
	include "$site.php"; ?>

      
		<footer>
        <p>&copy; fic 2012</p>
      </footer>
    </div><!--/.fluid-container-->
	

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap-transition.js"></script>
    <script src="js/bootstrap-alert.js"></script>
    <script src="js/bootstrap-modal.js"></script>
    <script src="js/bootstrap-dropdown.js"></script>
    <script src="js/bootstrap-scrollspy.js"></script>
    <script src="js/bootstrap-tab.js"></script>
    <script src="js/bootstrap-tooltip.js"></script>
    <script src="js/bootstrap-popover.js"></script>
    <script src="js/bootstrap-button.js"></script>
    <script src="js/bootstrap-collapse.js"></script>
    <script src="js/bootstrap-carousel.js"></script>
    <script src="js/bootstrap-typeahead.js"></script>
    <script src="js/lightbox.js"></script>

  </body>
</html>
